package com.aaa.three.controller;

import com.aaa.three.pojo.domain.PersonalQuery;
import com.aaa.three.pojo.query.PersonalQueryy;
import com.aaa.three.result.AjaxResult;
import com.aaa.three.service.PersonalInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:lyq
 * @Date:2022/2/2021:05
 */
@RestController
@RequestMapping("personalInfo")
public class PersonalInfoController {
    @Autowired
    private PersonalInfoService personalInfoService;

    @RequestMapping("getPersonalInfo")
    public AjaxResult getPersonalInfo( ){

       return personalInfoService.getPersonalInfo();
    }

    @RequestMapping("get")
    public AjaxResult get( Integer id){

        return personalInfoService.get(id);
    }

    @RequestMapping("update")
    public AjaxResult update(PersonalQuery query){
        System.out.println(query);

        return personalInfoService.update(query);
    }
    @RequestMapping("query")
    public AjaxResult query(PersonalQueryy personalQueryy){

        return personalInfoService.query(personalQueryy);
    }

}
